home *** CD-ROM | disk | FTP | other *** search
/ EDUCORP 8 / Educorp2Compilation.sit / educorp2 / Demos / PEGASYS II Demo / Macros / DoubleDoor < prev    next >
Encoding:
Text File  |  1988-08-04  |  1.6 KB  |  46 lines

  1. {-------------------------- DDOOR --------------------------
  2.  
  3. {This macro will create a Doubledoor symbol to the users input
  4. {specs. These variables are Width,Thickness and the angle of the
  5. {door. All pieces of the door are referenced off the point entered
  6. {by user.
  7.  
  8. {Some default values are set, User is prompted for variables.
  9. PROMPT Prompt=`Enter WIDTH of Doubledoor` Var=#DW  Typ=Num
  10. PROMPT Prompt=`Enter THICKNESS of Wall`    Var=#WAL Typ=Num
  11. PROMPT Prompt=`Enter ANGLE of Doors`          Var=#AD  Typ=Num
  12. PROMPT Prompt=`Locate Point`                        Var=#P1  Typ=Coor
  13.  
  14. {System Figures angle of opposing door.
  15. #DR=180-#AD
  16.  
  17. {Door jambs and header are drawn in.
  18. LI La=143 Pe=1 [A,#P1.x-(#DW/2),#P1.y-(#WAL/2)|0,#WAL|^|#DW|0,-#WAL|;]
  19. LI La=145 Pe=5 [0,0|-#DW|^|0,#WAL|#DW|;]
  20.  
  21. {Doors and door swings are drawn in.
  22. LI La=120 Pe=4 [0,0|P,#DW/2,#DR|P,1.5",#DR+90|P,#DW/2,#DR+180|k|;]
  23. AR R La=121 Pe=0 [0,0|-(#DW/2)|P,#DW/2,#DR|;]
  24. LI La=120 Pe=4 [A,#P1.x-(#DW/2),#P1.y+(#WAL/2)|P,#DW/2,#AD] \
  25.     [P,1.5",#AD-90|P,#DW/2,#AD+180|k|;]
  26. AR R La=121 Pe=0 [0,0|(#DW/2)|P,#DW/2,#AD|;]
  27.  
  28. {System groups door components.
  29. PROMPT Prompt=`Do You Want a TAG Name on Group` Var=#AN Typ=Swit
  30. If (#AN == 0), Goto GRP:
  31. PROMPT Prompt=`Enter TAG Name` Var=#TAG Typ=Str
  32. GP CL=120 Tag=#TAG [A,#P1.x,#P1.y|-|-|-|-|-|-|;]
  33. Goto Rot:
  34. GRP:
  35. GP CL=120 Tag=\ \ [A,#P1.x,#P1.y|-|-|-|-|-|-|;]
  36.  
  37. {Symbol is rotated if desired.
  38. ROT:
  39. PROMPT Prompt=`Rotate DOOR Y/N` Var=#AN Typ=Swit
  40. IF (#AN == 0), Goto DONE:
  41. PROMPT Prompt=`Enter ROTATION` Var=#RT Typ=Num
  42. TR A=#RT [A,#P1.x,#P1.y+(#WAL/2),O|;]
  43. DONE:
  44. MESSAGE St=`All Done` Time=1
  45. RETURN
  46.